<?php


namespace app\admin\middleware;


use think\facade\View;
use think\Request;

class HeaderInit
{

    public function handle(Request $request, callable $next)
    {
        $controller = strtolower($request->controller()) . '/' . $request->action();
        View::assign('js_name', $controller);

        return $next($request);
    }

}